package com.hw.paltfrom.controller.doncutor;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hw.paltfrom.pack.ResponseResult;
import com.hw.paltfrom.rescode.HWSystemCode;
import com.hw.paltfrom.service.doncutor.CountyCommandTaskService;
import com.hw.paltfrom.utils.VerifyUtil;
import com.hw.paltfrom.vo.CommandTaskCountyVo;
import com.hw.paltfrom.vo.StepInfoVO;

/**
 * 指挥调度县 邢家华 2019-11-7 10:59:05
 * 
 * @author Administrator
 *
 */
@RestController
@RequestMapping(value = "/commandTaskCounty")
public class CountyCommandTaskController {

	@Autowired
	private CountyCommandTaskService commandTaskCountyService;

	// 申请查询
	@RequestMapping(value = "/query")
	public Map<String, Object> Query(CommandTaskCountyVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return commandTaskCountyService.query(vo);

	}

	// 指派任务执行中查询
	@RequestMapping(value = "/assignedQuery")
	public Map<String, Object> assignedQuery(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedQuery(vo);

	}

	// 指派任务完结查询
	@RequestMapping(value = "/assignedEndQuery")
	public Map<String, Object> assignedEndQuery(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedEndQuery(vo);

	}

	// 详情

	@RequestMapping(value = "/queryDetails")
	public Map<String, Object> queryDetails(CommandTaskCountyVo vo) {

		return commandTaskCountyService.queryDetails(vo.getfId());
	}

	// 指派
	@RequestMapping(value = "/assigned")
	public Map<String, Object> assigned(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assigned(vo);

	}

	// 完结
	@RequestMapping(value = "/theEnd")
	public Map<String, Object> theEnd(@RequestBody StepInfoVO vo) {

		return commandTaskCountyService.theEnd(vo);

	}

	// 移交确认
	@RequestMapping(value = "/transferConfirmation")
	public Map<String, Object> transferConfirmation(@RequestBody StepInfoVO vo) {

		return commandTaskCountyService.transferConfirmation(vo);

	}

	// 上报视频
	@RequestMapping(value = "/reportTheVideo")
	public Map<String, Object> reportTheVideo(@RequestBody CommandTaskCountyVo vo) {

		return commandTaskCountyService.reportTheVideo(vo);

	}

	// 指派任务创建
	@RequestMapping(value = "/assignedInsert")
	public Map<String, Object> assignedInsert(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedInsert(vo);

	}

	// 指派任务中删除
	@RequestMapping(value = "/assignedDelete")
	public Map<String, Object> assignedDelete(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedDelete(vo);

	}

	// 指派任务中修改
	@RequestMapping(value = "/assignedUpdate")
	public Map<String, Object> assignedUpdate(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedUpdate(vo);

	}

	// 指派任务中完结
	@RequestMapping(value = "/assignedEnd")
	public Map<String, Object> assignedEnd(@RequestBody StepInfoVO vo) {

		return commandTaskCountyService.assignedEnd(vo);

	}

	// 指派任务中确认
	@RequestMapping(value = "/assignedConfirm")
	public Map<String, Object> assignedConfirm(@RequestBody StepInfoVO vo) {

		return commandTaskCountyService.assignedConfirm(vo);

	}

	// 指派任务
	@RequestMapping(value = "/assignedTasks")
	public Map<String, Object> assignedTasks(CommandTaskCountyVo vo) {

		return commandTaskCountyService.assignedTasks(vo);

	}

}
